package com.cqupt.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cqupt.model.pojo.AllWord;
import com.cqupt.service.AllWordService;
import com.cqupt.mapper.AllWordMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AllWordServiceImpl extends ServiceImpl<AllWordMapper, AllWord>
        implements AllWordService {

    @Resource
    private AllWordMapper allWordMapper;


    @Override
    public List<AllWord> queryLike(String word) {
        LambdaQueryWrapper<AllWord> wrapper = new LambdaQueryWrapper<>();
        wrapper.likeRight(AllWord::getWord, word);
        return allWordMapper.selectList(wrapper);
    }
}




